<template>
	<view class="main">
		<u-navbar
			:safeAreaInsetTop="false"
			title=""
			leftIconColor="#fff"
			bgColor="none"
			:fixed="true"
			:autoBack="true"
			leftText="平台介绍"
		></u-navbar>
		<view class="main_about_head">
			<image style="position: unset;" :src="imgURL+ info.thumb" ></image>
		</view>
		<view class="main_about_content">
			
			<view class="main_about_title">{{info.title}}</view>
			<view class="main_about_box">
				<view class="main_about_intro" v-html="info.content"></view>
			</view>
		</view>
		<view class="main_about_foot">
			<view class="foot_left">联系我们</view>
			<view class="foot_right" @click="goPhone(13800138000)">
				<u-icon name="phone" color="#fff" size="32"></u-icon>
			</view>
		</view>
	</view>
</template>

<script>
	import { getPageDetails } from '@/api/article.js'
	import { imgURL } from '@/utils/config'
	import util from "@/utils/utils.js"
	export default {
		data() {
			return {
				imgURL:imgURL,
				info: '',
			}
		},
		onLoad() {
			this.getEnterprise()
		},
		methods: {
			//获取信息
			getEnterprise() {
				getPageDetails({id:1}).then(res=>{
					if(res.code == 200){
						this.info = res.data
					}
					else{
						return uni.showToast({
							icon: 'none',
							title: res.msg
						});
					}
				})
			},
			
			goPhone(item) {
				uni.makePhoneCall({ phoneNumber: item.tele }) // 传参带入号码即可
			},
			goto(tourl) {
				uni.navigateTo({
					url: tourl
				});
			}
		},
	}
	
</script>

<style lang="scss">
	.main{
		.main_about_head{
			image{
				width: 100%;
				max-height: 100%;
			}
		}
		.main_about_content{
			position: absolute;
			background-color: #fff;
			border-top-left-radius: 20rpx;
			border-top-right-radius: 20rpx;
			margin-top: -50rpx;
			padding: 20rpx 80rpx;
			margin-bottom:140rpx;
			.main_about_title{
				color: #000;
				font-size: 32rpx;
				font-weight: bold;
				width: 100%;
			}
			.main_about_box{
				display: flex;
				.main_about_intro{
					margin: 30rpx 0;
					font-size: 28rpx;
					line-height: 50rpx;
					color: #777777;
				}
			}
		}
		
		.main_about_foot{
			width: 100%;
			display: flex;
			align-items: center;
			color: #fff;
			position: fixed;
			bottom: 0;
			.foot_left{
				background-color: #795fff;
				width: 50%;
				height:140rpx;
				line-height: 140rpx;
				display: flex;
				justify-content: center;
			}
			.foot_right{
				background-color: #000;
				width: 50%;
				height:140rpx;
				line-height: 140rpx;
				display: flex;
				justify-content: center;
			}
		}
	}
</style>